package cn.gs.global.common;

// @author gs
import java.util.List;
import org.hibernate.Query;

public class CntPriceInfo {

    private int id[];
    private int cnt[];
    private long price[];

    public CntPriceInfo() {
    }

    public CntPriceInfo(int[] id, int[] cnt, long[] price) {
        this.id = id;
        this.cnt = cnt;
        this.price = price;
    }

    public CntPriceInfo(Query q) {
        List<Object[]> list = q.list();
        id = new int[list.size()];
        cnt = new int[list.size()];
        price = new long[list.size()];
        int i = 0;
        for (Object[] oo : list) {
            id[i] = (Integer) oo[0];
            cnt[i] = (Integer) oo[1];
            price[i] = (Long) oo[2];
            ++i;
        }
    }

    public int[] getId() {
        return id;
    }

    public void setId(int[] id) {
        this.id = id;
    }

    public int[] getCnt() {
        return cnt;
    }

    public void setCnt(int[] cnt) {
        this.cnt = cnt;
    }

    public long[] getPrice() {
        return price;
    }

    public void setPrice(long[] price) {
        this.price = price;
    }
}
